/**
 * Created by 李伟伟 on 2019/10/2.
 */
import Axios from 'axios'

export default (param=null,url,type)=>{
  let data;
  let promise = Axios({
    method:type,
    url:url,
    data:param
  });
  return promise.then(res=>{
    return new Promise(function (resolve,reject) {
      resolve(res.data);
    });
  }).catch(res=>{
    return new Promise(function (resolve,reject) {
      reject(res.data);
    });
  });
}
